#include "common/pinyinconverter.h"
#include "pinyinconverter/pinyinconverter_p.h"
#include <QPushButton>
PinyinConverter::PinyinConverter()
{
	d = std::make_unique<PinyinConverterPrivate>(this);
}
PinyinConverter::~PinyinConverter()= default;

PinyinConverter& PinyinConverter::instance()
{
	static PinyinConverter instance;
	return instance;
}

QString PinyinConverter::cvt2Pinyin(const QString& str) const
{
	if (str.isEmpty())
		return {};
	return d->cvt2Pinyin(str);
}

QStringList PinyinConverter::cvt2PinyinList(const QString& str) const
{
	if (str.isEmpty())
		return {};
	return d->cvt2PinyinList(str);
}

QString PinyinConverter::cvt2FirstCell(const QString& str) const
{
	if (str.isEmpty())
		return {};
	return d->cvt2FirstCell(str);
}

